package kaoshi;

class Quest1 {
    public static void reverseString(char[] str) {
        char a;
        for (int i = 0; i < str.length / 2; i++) {
            a = str[i];
            str[i] = str[str.length - 1 - i];
            str[str.length - i - 1] = a;
        }
    }

    public static void main(String[] args) {
        char[] str = "abcdefg".toCharArray();
        reverseString(str);
        System.out.println(new String(str));
    }
}
